using System;
using System.Data;
using System.Data.Sql;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;
namespace DAL
{
    public class ACDB
    {
        internal static Database GetACDB()
        {
            return DatabaseFactory.CreateDatabase("LocalSqlServer");
        }
        public static IDataReader ExecGetDRAllSP(string SPName)
        {
            return DAL.ACDB.GetACDB().ExecuteReader(CommandType.StoredProcedure, SPName);
        }
        public static DataSet ExecGetDSAllSP(string SPName,params object[] list)
        {
            return DAL.ACDB.GetACDB().ExecuteDataSet(SPName, list);
        }
        public static int ExecNoQuery(string SPName,params object[] list)
        {
            return DAL.ACDB.GetACDB().ExecuteNonQuery(SPName, list);
        }
        public static IDataReader ExecGetDRRandomSP(string SPName, params object[] list)
        {
            return DAL.ACDB.GetACDB().ExecuteReader(SPName,list);
        }

    }
}
